<template>
    <div >
    这是index页面
    </div>
  </template>
  
  <script>
  export default {
    beforeRouteEnter(to,from,next){
    // 进入组件
    console.log('组件内前置',from,to);
  },
  beforeRouteUpdate(to,from,next){
    // 更新组件
    console.log('组件内更新',from,to);

  },
  beforeRouteLeave(to,from,next){
    // 离开组件
    console.log('组件内离开',from,to);
  },
    data() {
      return {
        d:new Date(),
        obj: {
          user: {
            name: "小明",
            gender: "男",
            age: 18,
          },
          user1: {
            name: "小文",
            gender: "男",
            age: 18,
          },
          user2: {
            name: "小庄",
            gender: "男",
            age: 18,
          },
        },
        
      };
    },
    filters:{
      format(){
        return '你好';
      }
    }
  };
  </script>
  
  <style>
  </style>
  